Uncaught TypeError: Cannot read property 'dispatch' of undefined